package angels.client.Entities;
import org.json.JSONException;
import org.json.JSONObject;

public class Categories {
	private String[] categories;
	
	public enum Type{category,subcategory};
	
	public Categories(JSONObject json_robots, Type type) throws JSONException {
		switch (type){
		case category:
			categories =json_robots.getString("cat").split(",");
			break;
		case subcategory:
			categories =json_robots.getString("sub").split(",");
			break;
		}
	}
	
	public String[] getCategories(){
		return categories;
	}
}